#ifndef __CE_GFX_MESH_BILLBOARDMESH_H__
#define __CE_GFX_MESH_BILLBOARDMESH_H__

#include <gfx/enum.h>
#include <gfx/ibillboardmesh.h>
#include <math/boundingbox.h>
#include <math/vector.h>

struct iDevice;
struct iIndexBuffer;
struct iVertexBuffer;
struct iVertexDeclaration;
struct ceRenderEnvironment;

/**
 * \addtogroup opengl
 * @{
 */
/**
 * @brief Standard implementation of the iBillboardMesh interface.
 *
 */
class ceBillboardMeshGL20 : public iBillboardMesh
{
  CE_OBJECT
private:
  iVertexBuffer*        _vertices;
  iIndexBuffer*         _indices;
  iVertexDeclaration*   _vertexDeclaration;

  ceBoundingBox     _bbox;

  ceVector2f         _stretching;

public:
  ceBillboardMeshGL20();

  bool Initialize (iDevice* device);

  void SetSize (const ceVector2f& size);

  virtual void Draw (const ceRenderEnvironment& renderEnvironment, iDevice* device);
  virtual void Update (const ceRenderEnvironment& renderEnvironment, iDevice* device);


  const ceBoundingBox& GetBoundingBox () const
  {
    return _bbox;
  }

  ceBoundingBox& GetBoundingBox ()
  {
    return _bbox;
  }


};

/** @} */

#endif // __CE_GFX_MESH_INSTANCEDMESH_H__
